#ifndef DEFAULT_FILE_NAME_H
#define DEFAULT_FILE_NAME_H


#include "file_list_struct_csv.hpp"
#include "csv_struct.hpp"

class file_list
{
  public:
	static const enum file_tags
	{
		OVERNIGHT_STAY_TYPE_FILENAME =1,
		TRAVELLING_TYPE_FILENAME,
		DAILY_TRAVELLING_ALLOWANCE_TYPE_FILENAME,
		CAR_MAINTENANCE_FILENAME,
		REFUELLING_FILENAME,
		COMMENT_IDENT_FILENAME,
		CAR_OWNERSHIP_FILENAME,
		CAR_POWER_FILENAME,
		CAR_POWER_RANGE_FILENAME,
		CAR_POWER_RANGE_AND_OWNERSHIP_FILENAME,
		FUEL_REFUND_FILENAME,
		CAR_SUPPLY_FILENAME,
		CAR_FILENAME,
		TRAVELLING_FILENAME,
		ALLOWANCE_TYPE_DETAIL_FILENAME,
		ALLOWANCE_TYPE_FILENAME,
		ACTIVITY_FILENAME,
		EXPENSE_FILENAME
	} csvfile_id;


	static const std::string list(std::string _fileListName = "")
	{
	     static std::string GLOBAL_FILE_LIST_NAME;

  	     if(_fileListName.length())
		GLOBAL_FILE_LIST_NAME = _fileListName;

		return GLOBAL_FILE_LIST_NAME;
	}


	inline file_list(char* filename): file(filename)
	{
		file_list::list(filename);
	};

	inline file_list(const std::string filename): file(filename)
	{
		file_list::list(filename);
	};

	static inline std::string const expense_filename()
	{
		return file_list::get_filename(EXPENSE_FILENAME);
	}

	static inline std::string const activity_filename()
	{
		return file_list::get_filename(ACTIVITY_FILENAME);
	}
	
	static inline std::string const allowance_type_detail_filename()
	{
		return file_list::get_filename(ALLOWANCE_TYPE_DETAIL_FILENAME);
	}

	static inline std::string const allowance_type_filename()
	{
		return file_list::get_filename(ALLOWANCE_TYPE_FILENAME);
	}

	static inline std::string const car_supply_filename()
	{
		return file_list::get_filename(CAR_SUPPLY_FILENAME);
	}
	
	static inline std::string const car_filename()
	{
		return file_list::get_filename(CAR_FILENAME);
	}

	static std::string const travelling_filename()
	{
		return file_list::get_filename(TRAVELLING_FILENAME);
	}

	static inline std::string const overnight_stay_type_filename()
	{
		return file_list::get_filename(OVERNIGHT_STAY_TYPE_FILENAME);
	}

	static inline std::string const travelling_type_filename()
	{
		return file_list::get_filename(TRAVELLING_TYPE_FILENAME);
	}

	static inline std::string const daily_travelling_allowance_type_filename()
	{
		return file_list::get_filename(DAILY_TRAVELLING_ALLOWANCE_TYPE_FILENAME);
	}

	static inline std::string const car_maintenance_filename()
	{
		return file_list::get_filename(CAR_MAINTENANCE_FILENAME);
	}

	static inline std::string const refuelling_filename()
	{
		return file_list::get_filename(REFUELLING_FILENAME);
	}

	static inline std::string const comment_ident_filename()
	{
		return file_list::get_filename(COMMENT_IDENT_FILENAME);
	}

	static inline std::string const car_ownership_filename()
	{
		return file_list::get_filename(CAR_OWNERSHIP_FILENAME);
	}

	static inline std::string const car_power_filename()
	{
		return file_list::get_filename(CAR_POWER_FILENAME);
	}

	static inline std::string const car_power_range_filename()
	{
		return file_list::get_filename(CAR_POWER_RANGE_FILENAME);
	}	

	static inline std::string const car_power_range_and_ownership_filename()
	{
		return file_list::get_filename(CAR_POWER_RANGE_AND_OWNERSHIP_FILENAME);
	}

	static inline std::string const fuel_refund_filename()
	{
		return file_list::get_filename(FUEL_REFUND_FILENAME);
	}

  protected:

	static file_list_struct_csv const find(int _id);
	static std::string const get_filename(int _id);	

  private:
	std::string file;
	
};

#endif

